feat(api): poll power state for PowerShelf in Ready#1878
Conversation
|
Is it possible thread the new RMS APIs through the Powershelf Manager interface and call it from state machine via indirection? We should avoid adding direct RMS calls from state machine whenever possible. |
Matthias247
left a comment
There was a problem hiding this comment.
A few comments about further possible improvements. But looks good to get merged
I have follow up change for CM wiring |
|
34fe26d to
7b29a8e
Compare
@zhaozhongn will make sure this gets addressed in follow up PR |
90e10ec to
463ea31
Compare
While a PowerShelf idles in Ready, perform a best-effort GetPowerStateByDeviceList RPC against RMS and persist the observed pstate to power_shelves.status. The lookup mirrors the NodeSet-with-inline-BMC-endpoint shape used by the Maintenance handler's SetPowerStateByDeviceList path, so build_power_shelf_node_info is bumped to pub(super) for reuse. Missing prerequisites (no RMS client, no rack association, no BMC details, no credentials) and transport / status failures are logged but never transition the controller out of Ready, so a transient RMS outage cannot bounce the shelf into Error. Also bumps librms from v0.0.12-rc1 to v0.0.12-rc4 (adds the prost-types dependency and the new GetPowerStateByDeviceList, firmware-object management, and SetScaleUpFabricState RPCs), and updates the in-tree mock RmsApi implementations to cover the new trait methods.
463ea31 to
16d5f6d
Compare
While a PowerShelf idles in
Ready, perform a best-effortGetPowerStateByDeviceListRPC against RMS and persist the observedpstatetopower_shelves.status. The lookup mirrors theNodeSet-with-inline-BMC-endpoint shape used by theMaintenancehandler'sSetPowerStateByDeviceListpath, sobuild_power_shelf_node_infois bumped topub(super)for reuse. Missing prerequisites (no RMS client, no rack association, no BMC details, no credentials) and transport / status failures are logged but never transition the controller out ofReady, so a transient RMS outage cannot bounce the shelf intoError. Also bumpslibrmsfromv0.0.12-rc1tov0.0.12-rc4(adds theprost-typesdependency and the newGetPowerStateByDeviceList, firmware-object management, andSetScaleUpFabricStateRPCs), and updates the in-tree mockRmsApiimplementations to cover the new trait methods.Description
Type of Change
Related Issues (Optional)
Breaking Changes
Testing
Additional Notes